package com.ssy.system.quartz;

import com.ssy.bus.service.IDepartmentService;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * @author sunshuaiyong
 * @ClassName RegisterQuartz
 * @description: 挂号列表定时任务
 * @date 2022/4/14 14:29
 */
public class RegisterQuartz extends QuartzJobBean {

    @Autowired
    private IDepartmentService departmentService;

    /**
     * @param jobExecutionContext
     * @description: 执行定时任务
     * @author: sunshuaiyong
     **/
    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        //清空当天的挂号量
        this.departmentService.clearRegister();
    }
}
